<jsp:include page="tempHeader.jsp" />
<jsp:include page="tempMenubar.jsp" />
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page import="cfs.databean.Customer"%>

<hr><div id="container">
        <div id="content" class="wrap">                
                <hr><h2 class="separate">Account Details</h2>
                <div class="marginBottom30 clearFix">
                        <div class="col1-3">
                             <h5>Name: </h5>
                             <p>${customer.firstname} &nbsp; ${customer.lastname}</p>
                             <h5>Email Address: </h5>
                             <p>${customer.email }</p>
                        </div>
                        <div class="col1-3">
                             <h5>Address: </h5>
                             <p>${customer.addr_line1}</p>
                             <p>${customer.addr_line2}</p>
                             <p>${customer.city} &nbsp; ${customer.state }&nbsp; ${customer.zip}</p>
                        </div>
                        
                        
                        <div class="col1-3">
                            <%
                            if(request.getSession().getAttribute("employee") != null){
                            %>
                            <h5>Action for Admin Personnel</h5>
                            <div id="contact_form">
                            <form method="post" action="customerTransaction.do">
                                 <input type="hidden" value="${customer.customer_id}" name="selectedUser" id="selectedUser"/>
                                 <input type="submit" class="submit_btn2" name="submit" id="submit" value="View Transaction" />
                            </form>
                            <form method ="post" action="resetPassword.do">
                                 <input type="hidden" value="${customer.customer_id}" name="selectedUser" id="selectedUser"/>
                                 <input type="submit" class="submit_btn2" name="submit" id="submit" value="Reset Password" />    
                            </form>
                            </div>    
                        <%}
                        %>
                        </div>
                </div>
                        
                
                <hr><h2 class="separate">Account Summary</h2>
                <div class="marginBottom30 clearFix">
                        <div class="col1-3">
                             <h5>Last Trading Day</h5>
                             <p>${lastTradingDay}</p>
                        </div>
                        <div class="col1-3">
                             <h5>Available Balance</h5>
                             <p>&#36;${availableBalance }</p>
                        </div>
                        <div class="col1-3">
                             <h5>Ledger Balance</h5>
                             <p>&#36;${cash}</p>
                        </div>
                </div>
               
               
                        
               <hr><h2 class="separate">Your Fund List</h2>
               <div class="marginBottom30 clearFix">
               <c:if test="${empty fundList}">
               <div>No funds available</div>
				</c:if>
               <c:if test="${!(empty fundList)}">
					
                   <table class="card-activity expandable" >
                       <thead style="text-align: left;">
			<tr>
                				<th class="header" width="220"><span class="under"><a href="#"
								title="Sort by Post Date" tabindex="64">Fund Symbol</a></span><span
							class="sorter card-noprint">&nbsp;&nbsp;&nbsp;</span></th>
						<th class="header" width="220"><span class="under"><a href="#"
								title="Sort by Description" tabindex="66">Fund Name</a></span><span
							class="sorter card-noprint">&nbsp;&nbsp;&nbsp;</span></th>
						<th class="amount header" style="text-align:right;" width="150"><span class="under"><a
								href="#" title="Sort by Amount" tabindex="67">Fund Price</a></span><span
							class="sorter card-noprint"></span></th>
						<th class="amount header" style="text-align:right;" width="200"><span class="under"><a
								href="#" title="Sort by Amount" tabindex="67">Shares </a></span><span
							class="sorter card-noprint"></span></th>
					</tr>
				</thead>

				<tbody>

						<c:forEach var="entry" items="${fundList}">
							<tr>
								<td><a href="viewFund.do?selectedFund=${entry.fund_id}">${entry.symbol}</td>
								<td>${entry.name}</td>
								<td style="text-align:right;">${entry.price}</td>
								<td style="text-align:right;">${entry.shares}</td>
							</tr>
						</c:forEach>
					
				</tbody>
			</table>
			</c:if>
			
			
                </div>
        </div>
</div>
<jsp:include page="tempBottom.jsp" />